package com.djx.provider.service;

import com.djx.comm.Pagination;
import com.djx.comm.entity.User;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * 用户 接口
 * @author dingjunxiong
 */
public interface UserService {
    /**
     * 添加 用户
     * @param user
     */
    void add(User user) throws Exception;

    /**
     * 修改 用户
     * @param user
     */
    void update(User user) throws Exception;

    /**
     * 删除 用户
     * @param id
     */
    void delete(String id);

    /**
     * 根据id查询详情
     * @param id
     * @return
     */
    User queryById(String id) throws Exception;

    /**
     * 分页查询
     * @param user
     * @return
     */
    Pagination queryPage(User user) throws Exception;

    /**
     * 下载附件
     * @param fileName
     * @param filePath
     * @param response
     */
    void downloadFile(String fileName, String filePath, HttpServletResponse response) throws Exception;

    /**
     * 数据导出
     * @param user
     */
    void downloadExcel(User user, HttpServletResponse response) throws Exception;

    /**
     * 数据导入
     * @param file
     */
    void importExcel(MultipartFile file);
}
